From f2aa5b4c90b84de4bf859b1045aa4a3768715244 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 9 Feb 2015 08:16:08 -0800 Subject: [PATCH] Update to rust master --- Cargo.lock | 87 +++++++++++++----------- src/bin/login.rs | 2 +- src/cargo/core/registry.rs | 2 +- src/cargo/core/resolver/encode.rs | 4 +- src/cargo/sources/git/utils.rs | 4 +- src/cargo/sources/path.rs | 2 +- src/rustversion.txt | 2 +- tests/test_cargo_compile.rs | 16 ++--- tests/test_cargo_compile_custom_build.rs | 14 ++-- 9 files changed, 71 insertions(+), 62 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be59b02f4..32cbb704e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,38 +2,38 @@ name = "cargo" version = "0.1.0" dependencies = [ - "advapi32-sys 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "advapi32-sys 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "curl 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "docopt 0.6.35 (registry+https://github.com/rust-lang/crates.io-index)", + "docopt 0.6.36 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "git2 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "hamcrest 0.1.0 (git+https://github.com/carllerche/hamcrest-rust.git)", - "log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "registry 0.1.0", "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tar 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "term 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "advapi32-sys" -version = "0.0.3" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -42,9 +42,9 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "curl-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -52,18 +52,18 @@ name = "curl-sys" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "docopt" -version = "0.6.35" +version = "0.6.36" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "regex 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -72,8 +72,8 @@ name = "env_logger" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -81,7 +81,7 @@ name = "flate2" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -95,9 +95,9 @@ name = "git2" version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)", + "url 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -112,15 +112,15 @@ source = "git+https://github.com/carllerche/hamcrest-rust.git#70d572f27ebbffb5a8 [[package]] name = "kernel32-sys" -version = "0.0.6" +version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libc" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -130,7 +130,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libssh2-sys 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -148,7 +148,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libz-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "log" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -176,16 +176,17 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "gcc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "libressl-pnacl-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -193,6 +194,11 @@ name = "pkg-config" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pkg-config" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pnacl-build-helper" version = "1.3.2" @@ -200,7 +206,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "regex" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -231,18 +237,18 @@ name = "term" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.0.7 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "time" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -255,7 +261,7 @@ dependencies = [ [[package]] name = "url" -version = "0.2.19" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -264,6 +270,9 @@ dependencies = [ [[package]] name = "winapi" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] diff --git a/src/bin/login.rs b/src/bin/login.rs index e716af48c..2726c937c 100644 --- a/src/bin/login.rs +++ b/src/bin/login.rs @@ -30,7 +30,7 @@ pub fn execute(options: Options, config: &Config) -> CliResult> { let token = match options.arg_token.clone() { Some(token) => token, None => { - let err = (|:| { + let err = (|| { let src = try!(SourceId::for_central(config)); let mut src = RegistrySource::new(&src, config); try!(src.update()); diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs index 6f0dea3cc..adf05b0fa 100644 --- a/src/cargo/core/registry.rs +++ b/src/cargo/core/registry.rs @@ -160,7 +160,7 @@ impl<'a, 'b> PackageRegistry<'a, 'b> { } fn load(&mut self, source_id: &SourceId, kind: Kind) -> CargoResult<()> { - (|:| { + (|| { let mut source = source_id.load(self.config); // Ensure the source has fetched all necessary remote data. diff --git a/src/cargo/core/resolver/encode.rs b/src/cargo/core/resolver/encode.rs index c5c4f65ca..9ef4a4ff4 100644 --- a/src/cargo/core/resolver/encode.rs +++ b/src/cargo/core/resolver/encode.rs @@ -26,7 +26,7 @@ impl EncodableResolve { let packages = self.package.as_ref().unwrap_or(&packages); { - let mut register_pkg = |&mut: pkg: &EncodableDependency| + let mut register_pkg = |pkg: &EncodableDependency| -> CargoResult<()> { let pkgid = try!(pkg.to_package_id(default)); let precise = pkgid.source_id().precise() @@ -44,7 +44,7 @@ impl EncodableResolve { } { - let mut add_dependencies = |&mut: pkg: &EncodableDependency| + let mut add_dependencies = |pkg: &EncodableDependency| -> CargoResult<()> { let package_id = try!(pkg.to_package_id(default)); diff --git a/src/cargo/sources/git/utils.rs b/src/cargo/sources/git/utils.rs index d5ea95119..898f08270 100644 --- a/src/cargo/sources/git/utils.rs +++ b/src/cargo/sources/git/utils.rs @@ -182,7 +182,7 @@ impl GitDatabase { pub fn rev_for(&self, reference: &GitReference) -> CargoResult { let id = match *reference { GitReference::Tag(ref s) => { - try!((|:| { + try!((|| { let refname = format!("refs/tags/{}", s); let id = try!(self.repo.refname_to_id(&refname)); let obj = try!(self.repo.find_object(id, None)); @@ -193,7 +193,7 @@ impl GitDatabase { })) } GitReference::Branch(ref s) => { - try!((|:| { + try!((|| { let b = try!(self.repo.find_branch(s, git2::BranchType::Local)); b.get().target().chain_error(|| { human(format!("branch `{}` did not have a target", s)) diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index 7401a0764..cc546340f 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -84,7 +84,7 @@ impl<'a, 'b> PathSource<'a, 'b> { let include = try!(pkg.manifest().include().iter() .map(|p| parse(p)).collect::, _>>()); - let mut filter = |&mut: p: &Path| { + let mut filter = |p: &Path| { let relative_path = p.path_relative_from(&root).unwrap(); include.iter().any(|p| p.matches_path(&relative_path)) || { include.len() == 0 && diff --git a/src/rustversion.txt b/src/rustversion.txt index 0d845a26a..e2a057dc7 100644 --- a/src/rustversion.txt +++ b/src/rustversion.txt @@ -1 +1 @@ -2015-02-05 +2015-02-09 diff --git a/tests/test_cargo_compile.rs b/tests/test_cargo_compile.rs index 6fd759f69..20fcab8d7 100644 --- a/tests/test_cargo_compile.rs +++ b/tests/test_cargo_compile.rs @@ -1585,23 +1585,23 @@ test!(transitive_dependencies_not_available { version = "0.0.1" authors = [] - [dependencies.a] + [dependencies.aaaaa] path = "a" "#) - .file("src/main.rs", "extern crate b; extern crate a; fn main() {}") + .file("src/main.rs", "extern crate bbbbb; extern crate aaaaa; fn main() {}") .file("a/Cargo.toml", r#" [package] - name = "a" + name = "aaaaa" version = "0.0.1" authors = [] - [dependencies.b] + [dependencies.bbbbb] path = "../b" "#) - .file("a/src/lib.rs", "extern crate b;") + .file("a/src/lib.rs", "extern crate bbbbb;") .file("b/Cargo.toml", r#" [package] - name = "b" + name = "bbbbb" version = "0.0.1" authors = [] "#) @@ -1610,8 +1610,8 @@ test!(transitive_dependencies_not_available { assert_that(p.cargo_process("build").arg("-v"), execs().with_status(101) .with_stderr("\ -[..] can't find crate for `b` -[..] extern crate b; [..] +[..] can't find crate for `bbbbb` +[..] extern crate bbbbb; [..] [..] error: aborting due to previous error Could not compile `foo`. diff --git a/tests/test_cargo_compile_custom_build.rs b/tests/test_cargo_compile_custom_build.rs index 038ec33f5..b110b86be 100644 --- a/tests/test_cargo_compile_custom_build.rs +++ b/tests/test_cargo_compile_custom_build.rs @@ -620,17 +620,17 @@ test!(build_deps_not_for_normal { version = "0.5.0" authors = [] build = "build.rs" - [build-dependencies.a] + [build-dependencies.aaaaa] path = "a" "#) - .file("src/lib.rs", "extern crate a;") + .file("src/lib.rs", "extern crate aaaaa;") .file("build.rs", " - extern crate a; + extern crate aaaaa; fn main() {} ") .file("a/Cargo.toml", r#" [project] - name = "a" + name = "aaaaa" version = "0.5.0" authors = [] "#) @@ -639,9 +639,9 @@ test!(build_deps_not_for_normal { assert_that(p.cargo_process("build").arg("-v").arg("--target").arg(target), execs().with_status(101) .with_stderr("\ -[..]lib.rs[..] error: can't find crate for `a` -[..]lib.rs[..] extern crate a; -[..] ^~~~~~~~~~~~~~~ +[..]lib.rs[..] error: can't find crate for `aaaaa` +[..]lib.rs[..] extern crate aaaaa; +[..] ^~~~~~~~~~~~~~~~~~~ error: aborting due to previous error Could not compile `foo`. -- 2.30.2